]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Show 'Log out' in more situations
authorMatthias Clasen <mclasen@redhat.com>
Mon, 29 Oct 2012 03:55:43 +0000 (23:55 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 31 Oct 2012 16:45:08 +0000 (12:45 -0400)
When the current user is a remote account, or a we are logged in
as root, we should always show 'Log out'.

https://bugzilla.gnome.org/show_bug.cgi?id=686736

js/ui/userMenu.js

index 8324fb15739f234e7e40540f8eb0e316869528f7..d68b4e6571346b9b9f1b72cb69789b09c8366370 100644 (file)
@@ -616,10 +616,12 @@ const UserMenuButton = new Lang.Class({
 
     _updateLogout: function() {
         let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
+        let systemAccount = this._user.system_account;
+        let localAccount = this._user.local_account;
         let multiUser = this._userManager.has_multiple_users;
         let multiSession = Gdm.get_session_ids().length > 1;
 
-        this._logoutItem.actor.visible = allowLogout && (multiUser || multiSession);
+        this._logoutItem.actor.visible = allowLogout && (multiUser || multiSession || systemAccount || !localAccount);
     },
 
     _updateLockScreen: function() {